import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "./App.vue";
import router from "./router";
// 基础样式清除
import "./assets/style/reset.css";
// 添加tailwindcss样式
import "./assets/style/tailwindcss.css";
// element-plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// 移动端适配
import "lib-flexible/flexible"; //  npm i lib-flexible
// 引入vant组件样式
import "vant/lib/index.css";
import { Tabbar, TabbarItem, Icon } from "vant";
import { Field, CellGroup, Button, Search } from "vant";
import { Loading } from "vant";

import piniaPluginPersistedstate from "pinia-plugin-persistedstate"; //引入持久化插件

const pinia = createPinia(); //创建pinia实例
pinia.use(piniaPluginPersistedstate); //将插件添加到 pinia 实例上

const app = createApp(App);

app.use(router);
app.use(pinia);
app.use(ElementPlus);

// 引入vant组件
app.use(Tabbar);
app.use(TabbarItem);
app.use(Icon);
app.use(Field);
app.use(CellGroup);
app.use(Button);
app.use(Search);
app.use(Loading);

app.mount("#app");
